﻿using RTW.Core.Datas;
using RTW.Core.Ioc;
using RTW.Models;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;

namespace RTW.Servers
{
    public class SysLogServer : BaseDAL<TLog>, IAutoInject
    {
        public async Task<List<TLog>> GetSysLogForJson(string DMID)
        {
            //设置查询条件
            var list = DbType.DB().Queryable<TLog>()
                .Include(m=>m.User)
                .Include(m=>m.DM)
                .WhereIf(DMID != null, m => m.DMID == DMID)
                .ToListAsync();
            return await list;
        }
    }
}
